package com.example.agriculyural.Chain;

import com.example.agriculyural.FactoryMethod.AgriculturalMachine;

public class FaultDetectionHandler extends SafetyHandler{
    @Override
    public void handleSafety(String issue, AgriculturalMachine machine) {
        if (issue.contains("故障")) {
            System.out.println("故障检测处理器: " + machine.getMachineType() + " " + machine.getId() + " 检测到故障，停止作业");
        } else if (nextHandler != null) {
            nextHandler.handleSafety(issue, machine);
        }
    }
}
